<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="template-head.jsp" />
<jsp:include page="template-body.jsp" />
<div class="container">
	<jsp:include page="errors.jsp"/>
<div id="likertquestionpage">
	<h1>Likert Type Question</h1>
	<div id="likertquestionbody">
	<div class="hero-unit">
	<c:choose>
		<c:when test="${likert == 'first'}">
		<form id="likertquestionform" method="post" action="likertq.do">
			<div id="likertquestiontext">
				<textarea name="question" rows="10" cols="100">Type your question here.</textarea>
			</div>
			<div id="likertquestiondynetmlattr">
				<p>Enter the dynetml attribute identifier for this question</p>
				<input type="text" name="dynetmlAttr" value="${likertqform.dynetmlAttr}">
			</div>
			
			<div id="likertquestionfiveseven">
				<p>Select number of choices.</p>
				<select name="type" class="type">
					<option>5</option>
					<option>7</option>
				</select>
			</div>

			<div id="likertquestionbutton">
				<table>
					<tr>
						<td><input type="submit" name="button" class="btn btn-success"  value="Next"></td>
					</tr>
					<tr>
						<td><input type="submit" name="button" class="btn btn-inverse"  value="Back"></td>
					</tr>
				</table>
			</div>
		</form>
		</c:when>
		
		<c:otherwise>
		<form id="likertquestionform" method="post" action="likertq.do">
			<div id="likertquestiontype">
				<p>Choose the weight of likert questions.</p>
				<c:choose>
					<c:when test="${likert == 'five'}">
						<select name="type" class="type">
							<option>1,2,3,4,5</option>
							<option>-2,-1,0,1,2</option>
						</select>
					</c:when>
					<c:otherwise>
						<select name="type" class="type">
							<option>1,2,3,4,5,6,7</option>
							<option>-3,-2,-1,0,1,2,3</option>
						</select>
					</c:otherwise>
				</c:choose>
			</div>
			
			<div id="likertquestionchoices">
				<table>
					<tr>
						<td>Choice 1: <input type="text" name="choice1" value="${likertqform.choice1}"></td>
					</tr>
					<tr>
						<td>Choice 2: <input type="text" name="choice2" value="${likertqform.choice2}"></td>
					</tr>
					<tr>
						<td>Choice 3: <input type="text" name="choice3" value="${likertqform.choice3}"></td>
					</tr>
					<tr>
						<td>Choice 4: <input type="text" name="choice4" value="${likertqform.choice4}"></td>
					</tr>
					<tr>
						<td>Choice 5: <input type="text" name="choice5" value="${likertqform.choice5}"></td>
					</tr>
					<c:if test="${likert == 'seven'}">
					<tr>
						<td>Choice 6: <input type="text" name="choice6" value="${likertqform.choice6}"></td>
					</tr>
					<tr>
						<td>Choice 7: <input type="text" name="choice7" value="${likertqform.choice7}"></td>
					</tr>
					</c:if>
				</table>
			</div>
			
			<div id="likertquestionbutton">
				<table>
					<tr>
						<td><input type="submit" name="button" class="btn btn-success"  value="Submit"></td>
					</tr>
					<tr>
						<td><input type="submit" name="button" class="btn btn-inverse"  value="Back"></td>
					</tr>
				</table>
			</div>
		</form>
		</c:otherwise>
	</c:choose>
	</div>
	</div>
</div>
</div>
<!--Create another space for contents' extension  -->
	<div class="container2">
	
	
 	</div>
<jsp:include page="template-foot.jsp" /> 